package code.starivan.niuke.jindian;

/**
 * Created by Ivan on 2015/9/8.
 */
public class MinimalBST {
    public int buildMinimalBST(int[] vals) {
        // write code here
        if(vals==null||vals.length==0){
            return 0;
        }

        return (int)(Math.log(vals.length-1)/Math.log(2))+1;
    }
}
